C1.LiveLinq.Indexing Namespace : Index<T,TKey> Class |
'Declaration
Public MustInherit Class Index (Of T,TKey) Inherits Index(Of T) Implements C1.LiveLinq.Indexing.Search.IIndexScanner(Of T), C1.LiveLinq.Indexing.Search.IIndexScanner(Of T,TKey)
public abstract class Index<T,TKey> : Index<T>, C1.LiveLinq.Indexing.Search.IIndexScanner<T>, C1.LiveLinq.Indexing.Search.IIndexScanner<T,TKey>
Indexes can be created and added to a collection explicitly in code by calling IndexCollection.Add, or their creation can be enforced in LINQ queries by using the Indexed hint.
In LINQ queries, indexes are used for optimizing query performance if that is specified with an Indexed hint. Usually, hints are not required, because LiveLinq can automatically determine that an index can be used to speedup a query, but using hints helps to ensure this optimization.
Indexes can also be used programmatically in code, without LINQ syntax, by using the methods of the C1.LiveLinq.Indexing.Search.IIndexScanner<T,TKey> interface that is implemented by the Index<T,TKey> class. For example, you can call such methods as Find directly for an Index<T,TKey> object.
It must be kept in mind that every index you create introduces a trade-off: it can dramatically speed up searches, but it consumes memory and adds some (usually, small) overhead every time the indexed collection (or any of the items, its elements) is modified. This is why indexes should generally be kept only while you need them for queries. To delete an index, use IndexCollection.Remove.
An index can have subindexes, see Subindex<T,TKey>. Subindexes are optional, not required for any indexing tasks, but can provide additional optimization and help minimize memory requirements when a collection is indexed by multiple keys. In presence of subindexes, an index is the root level of a tree of subindexes.
System.Object
C1.LiveLinq.Indexing.IndexDefinition<T>
C1.LiveLinq.Indexing.Index<T>
C1.LiveLinq.Indexing.Index<T,TKey>
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2